import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)


export default new Router({
    mode: 'history',
    routes: [
      {
        path: '/login',
        name: 'Login',
        component: () => import('../views/auth/Login'),
        meta: {title: '登陆'}
      },
      {
        path: '/register',
        name: 'Register',
        component: () => import('../views/auth/Register'),
        meta: {title: '注册'}
      },
      {
        path: '/',
        name: 'Index',
        component: () => import('../views/layout/Layout'),
        meta: {title: '首页'},
        children: [
          {
            path: '/project_list',
            name: 'ProjectList',
            component: () => import('../views/project/Project_list'),
            meta: {title: '项目广场'}
          },
          {
            path: '/project/disbod',
            name: 'Disbod',
            component: () => import('../views/project/Project_diasbod'),
            meta: {title: '项目概述'}
          },
          {
            path: '/project',
            name: 'Project',
            component: () => import('../views/layout/ProjectLayout'),
            meta: {title: '首页'},
            children: [
              {
                path: '/project/interface',
                name: 'Interface',
                component: () => import('../views/interface/Interface_list'),
                meta: {title: '接口测试'}
              },
              {
                path: '/project:id/setting',
                name: 'Setting',
                component: () => import('../views/project/ProjectSetting'),
                meta: {title: '项目设置'}
              }
            ]
          }
          // {
          //   path: '/project/disbod',
          //   name: 'Disbod',
          //   component: () => import('../views/project/Project_diasbod'),
          //   meta: {title: '项目概述'}
          // },
          // {
          //   path: '/project/interface',
          //   name: 'Interface',
          //   component: () => import('../views/interface/Interface_list'),
          //   meta: {title: '接口测试'}
          // },
          // {
          //   path: '/project:id/setting',
          //   name: 'Setting',
          //   component: () => import('../views/project/ProjectSetting'),
          //   meta: {title: '项目设置'}
          // }
        ]
      },
      {
        path: '/project',
        name: 'Project',
        component: () => import('../views/layout/ProjectLayout'),
        meta: {title: '首页'},
        children: [
          {
            path: '/project/disbod',
            name: 'Disbod',
            component: () => import('../views/project/Project_diasbod'),
            meta: {title: '项目概述'}
          }
        ]
      },
    ]
  }
)
